//checking for: bool check_clash(Schedule*)

//case1: same day & different time
//Sep 25 2012, 14:30-17:15 and 17:30-19:00
TEST(Clash_Test, sameDay_separate_time)
{
	Schedule* sch1=new Schedule("120925","1430","1715","coding","Embedded",Schedule::LOW);
	Schedule* sch2=new Schedule("120925","1730","1900","eating","SOC",Schedule::LOW);

	bool clash=sch1->check_clash(sch2);

	ASSERT_EQ(clash,false);
}

//case2: same day & schedule 1 start first
//schedule2 start before sch1 finish
//Sep 25 2012, 14:30-17:15 and 16:00-19:00
TEST(Clash_Test, sameDay_sch1_first)
{
	Schedule* sch1=new Schedule("120925","1430","1715","coding","Embedded",Schedule::LOW);
	Schedule* sch2=new Schedule("120925","1600","1900","eating","SOC",Schedule::LOW);

	bool clash=sch1->check_clash(sch2);

	ASSERT_EQ(clash,true);
}

//case3: same day & schedule 2 start first
//schedule1 start before sch2 finish
//Sep 25 2012, 17:48-18:59 and 16:00-19:00
TEST(Clash_Test, sameDay_sch2_first)
{
	Schedule* sch1=new Schedule("120925","1745","1859","coding","Embedded",Schedule::LOW);
	Schedule* sch2=new Schedule("120925","1600","1900","eating","SOC",Schedule::LOW);

	bool clash=sch1->check_clash(sch2);

	ASSERT_EQ(clash,true);
}

//case4: same day & start at the same time
//Sep 25 2012, 14:30-17:15 and 14:30-19:00
TEST(Schedule_Clash_Test, sameDay_same_start)
{
	Schedule* sch1=new Schedule("120925","1430","1715","coding","Embedded",Schedule::LOW);
	Schedule* sch2=new Schedule("120925","1430","1900","eating","SOC",Schedule::LOW);

	bool clash=sch1->check_clash(sch2);

	ASSERT_EQ(clash,true);
}
